package cn.wolfcode.luowowo.article.query;

import java.util.HashMap;
import java.util.Map;

public class TravelCondition {
    // 出游时间常量映射
    public static final Map<Integer, TravelCondition> DAYSMAP = new HashMap<>();
    // 旅游触发时间月份
    public static final Map<Integer, TravelCondition> TIMEMAP = new HashMap<>();
    // 旅游人均消费
    public static final Map<Integer, TravelCondition> PRE_EXPENDSMAP = new HashMap<>();

    static {
        // 页面传入与范围映射
        DAYSMAP.put(1, new TravelCondition(0,3));
        DAYSMAP.put(2, new TravelCondition(4,7));
        DAYSMAP.put(3, new TravelCondition(8,14));
        DAYSMAP.put(4, new TravelCondition(15,Integer.MAX_VALUE));

        // 旅游出发月份
        TIMEMAP.put(-1, new TravelCondition(1, 12));
        TIMEMAP.put(1, new TravelCondition(1, 2));
        TIMEMAP.put(2, new TravelCondition(3, 4));
        TIMEMAP.put(3, new TravelCondition(5, 6));
        TIMEMAP.put(4, new TravelCondition(7, 8));
        TIMEMAP.put(5, new TravelCondition(9, 10));
        TIMEMAP.put(6, new TravelCondition(11, 12));

        // 人均消费
        PRE_EXPENDSMAP.put(1, new TravelCondition(1, 999));
        PRE_EXPENDSMAP.put(2, new TravelCondition(1000, 6000));
        PRE_EXPENDSMAP.put(3, new TravelCondition(6001, 200000));
        PRE_EXPENDSMAP.put(4, new TravelCondition(200001, Integer.MAX_VALUE));
    }

    private int min; // 小值
    private int max; // 大值

    public TravelCondition(int min, int max){
        this.min = min;
        this.max = max;
    }
}
